package com.ws.mapper;

import com.ws.bean.Categories;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

public interface CategorieMapper {
    @Select("select * from categories")
    List<Categories> list();

    @Insert("insert into categories(categorie_name) values(#{categorie_name})")
    int add(Categories categories);

    @Delete("delete from categories where categorie_id=#{id}")
    int delete(Integer id);
}
